<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>



<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<script type="text/javascript" src="${initParam.rootPath}/script/jquery.js"></script>
<title>로그인</title>
</head>
<body>
<c:if test="${requestScope.result == 1 }">
<script type="text/javascript">
	window.opener.location.reload(true);
	window.close();
</script>
</c:if>
<c:if test="${requestScope.result == 2 }">
<script type="text/javascript">
$(document).ready(function(){
	$("#error").css({	"display" : "block"});
	$("#error").append("로그인 실패");
	
});
</script>
</c:if>
<br>로그인<br><br>   
<!-- <hr noshade="noshade" width="30%" align="left"> -->

<form action="/must_go/membership/login.do" method="post" >
	<table>
		<tr>
			<td>아이디</td>
			<td><input type="text" name="id" size="20" id="id" /></td>
		</tr>
		<tr>
			<td>패스워드</td>
			<td><input type="password" name="password" size="20" id="password"/></td>
		</tr>
		<tr>
			<td colspan="2" id="error" style="display: none;  color: red;"></td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<input type="submit" value="로그인"/>
				<input type="reset" value="초기화"/>
			</td>
		</tr>
	</table>	
			<a href="javascript:test();">회원가입</a>
			<a href="/must_go/membership/findId.do">아이디찾기</a>&nbsp;&nbsp;/&nbsp;
			<a href="/must_go/membership/findAddress.do">비밀번호찾기</a>

<script type="text/javascript">
function test(){
	window.opener.location.href="/must_go/membership/join.do";
	window.close();
};
/* function test2(){
	$.ajax({
		"url" : "/must_go/membership/login.do",
		"type" : "POST",
		"data" : {id : $("#id").val(), password : $("#password").val()},
		"dataType" : "JSON",
		"success" : function(){
							window.opener.location.reload(true);
							window.close();
					}
	})
}; */
</script>			
			
</form>


</body>
</html>